package com.hgvip.controller;

import com.hgvip.common.entity.ResponseData;
import com.hgvip.common.entity.goods.Goods;
import com.hgvip.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by arnold.zhu on 2017/9/25.
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping("/testHello")
    public ResponseData testHello() {
        return new ResponseData(200, testService.testSayHello());
    }

    @RequestMapping("/addGoods")
    public ResponseData testAddGoods(Goods goods) {
        return testService.addGoods(goods);
    }

}
